/************************************************************************

								Heroes IV
					  Copyright 2001, The 3DO Company

	------------------------------------------------------------------
  							 town_type_set.h

	$Header: $

	$NoKeywords: $

 ************************************************************************/

#ifndef TOWN_TYPE_SET_H_INCLUDED
#define TOWN_TYPE_SET_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <bitset>
#include <iosfwd>
#include "town_type.h"

class t_town_type_set : public std::bitset<k_town_type_count>
{
	public:
		t_town_type_set();
		t_town_type_set(std::bitset<k_town_type_count> const & source);

		bool read( std::streambuf& stream );
		bool write( std::streambuf& stream ) const;

		t_town_type_set & operator=( std::bitset<k_town_type_count> const & source );
};

// ------------------------------------------------------------------------------
// Inline constructors
// ------------------------------------------------------------------------------
inline t_town_type_set::t_town_type_set()
{
}

inline t_town_type_set::t_town_type_set(std::bitset<k_town_type_count> const & source)
	: std::bitset<k_town_type_count>(source)
{
}

inline t_town_type_set & t_town_type_set::operator=( std::bitset<k_town_type_count> const & source )
{
	typedef std::bitset<k_town_type_count> * base_ptr;
	*( base_ptr( this ) ) = source;

	return *this;
}

#endif // TOWN_TYPE_SET_H_INCLUDED
